import React, {useContext, useEffect, useState} from 'react';
import "./Articles.css"
import { NavLink, useLocation, useNavigate} from 'react-router-dom';

import { Message} from "../Message/message"
import { AuthContext } from '../../contexts/authContext';
import { getArticles } from "../../fake-api"
export const Articles = ()=>{
    let { pathname } = useLocation()
    let navigate = useNavigate();
    
    return (
        <>
            <div className="nav-box">
                <li><NavLink to={pathname}>热门</NavLink></li>
                <li><NavLink to={pathname + "?sort=new"}>最新</NavLink></li>
                <li><NavLink to={pathname + "?sort=hottest"}>历史</NavLink></li>
            </div>
            <Message />
            
        </>
    )
}